package wiki.hitime.stl.daq.feign;

import com.alibaba.fastjson.JSONObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @author zhangdaoping
 * @create 2020-01-08 11:56
 */
@FeignClient(name = "wechat", url = "https://qyapi.weixin.qq.com")
public interface WechatFeignClient {

    /**
     * 钉钉消息发送
     *
     * @param webhook    令牌
     * @param requestObj 请求实体
     * @return
     */
    @RequestMapping(value = "/cgi-bin/webhook/send?key={webhook}", method = RequestMethod.POST)
    JSONObject send(@PathVariable("webhook") String webhook, @RequestBody JSONObject requestObj);
}
